<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<h1>窗口事件</h1>
<hr>

<div>
    <img style="width: 30%" src="https://img.simoniu.com/%E6%B5%8B%E8%AF%95%E7%94%A8%E5%A3%81%E7%BA%B8001.jpg"
         id="mypic"/>
    <br>
    <textarea rows="20" cols="40" id="content" placeholder="写点什么吧！">
</textarea>
</div>
<script>
    $("#mypic").on('load', function () {
        alert('图片加载完毕！');
    })
    $(function () {
        $(window).resize(function () {
            let w = window.innerWidth;
            let h = window.innerHeight;
            console.log('正在更改尺寸....,width:' + w + ",height:" + h);
        })
    })
</script>

</body>
</html>
